package io.xxx.omni.oss.domain

import java.time.LocalDateTime

/**
 * 平台
 */
data class Platform(
    val id: String,
    val name: String,
    val enabled: Boolean,
    val created: LocalDateTime,
    val modified: LocalDateTime,
    val authorizations: List<Authorization>,
) {
    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as Platform

        if (id != other.id) return false
        if (modified != other.modified) return false

        return true
    }

    override fun hashCode(): Int {
        var result = id.hashCode()
        result = 31 * result + this.modified.hashCode()
        return result
    }
}